package com.sjsu.CMPE226.etl.parser;

import java.io.BufferedReader;
import java.io.FileReader;
/**
 * 
 * @author Pawar Deepali
 *
 */
public class OUTFileparser {

	public String readFile(String fPath) throws java.io.IOException {
		StringBuffer fData = new StringBuffer(1000);
		BufferedReader reader = new BufferedReader(new FileReader(fPath));
		char[] buf = new char[1024];
		int numRead = 0;
		while ((numRead = reader.read(buf)) != -1) {
			String readData = String.valueOf(buf, 0, numRead);

			fData.append(readData);
			buf = new char[1024];
		}
		reader.close();
		//System.out.println("raw data:" + fData.toString().replaceAll("\r", "\n"));
		return fData.toString().replaceAll("\r", "\n");
	}
}
